package com.shiguiwu.springboot3.agent;

import java.lang.instrument.Instrumentation;

/**
 * @description: agent类
 * @author: stone
 * @date: Created by 2023/12/2 12:56
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.agent
 */
public class MyAgentMain {

    // premain()函数中注册MyClassFileTransformer转换器
    public static void premain(String agentArgs, Instrumentation instrumentation) {
        System.out.println("premain方法");
        instrumentation.addTransformer(new MyClassFileTransformer(), true);
    }
}
